<template>
  <div class="radio">
    <ul v-if="radioList">
      <li class="remarks">
        <div class="flex2">
          <p>电台名</p>
        </div>
        <div>
          <p>主持人</p>
        </div>
        <div class="cen">
          <p>节目数</p>
        </div>
      </li>
      <li v-for="(val,index) in radioList" :key="index">
        <radioList :infoList='val'/>
      </li>
    </ul>
  </div>
</template>

<script>
import require from "requests/getSong";
import radioList from "components/business/radioList";
export default {
  name:'radio',
  data(){
    return {
      radioList:null
    }
  },
  components:{
    radioList
  },
  methods:{
    getRadio() {
      require.getRadio(this.$store.state.userId).then(res => {
        this.radioList=res.data.djRadios
        //console.log(this.radioList)
      });
    }
  },
  mounted(){
    this.getRadio()
  }
}
</script>

<style scoped lang='less'>
.radio{
    ul{
      li{
        margin: 8px 0;
      }
    }
    .remarks{
      display: flex;
      div{
        flex: 1;
        color: #999;
      }
      .flex2{
        flex: 2;
      }
      .cen{
        p{
          text-align: center;
        }
      }
    }
  }
</style>